﻿using System;

namespace Rounding
{
    class Program
    {
        static void Main(string[] args)
        {
            double i;

            int j, k;

            Console.WriteLine("请输入一个正数");

            i = double.Parse(Console.ReadLine());

            j = (int)i;

            if ((i - j) >= 0.5)

                k = j + 1;

            else

                k = j;

            Console.WriteLine("{0}四舍五入的结果为{1}", i, k);
            Console.WriteLine(" ");
            Console.ReadKey();
        }
    }
}
